import java.io.File;
import java.io.IOException;

public class AndroidDecompileTookit {

	public static void main(String[] args) {
		String apkFileName = "d:/ShakeLight.1.5.9.apk";
		String targetPath = "d:/temp1";
		if (args.length > 0) {
			apkFileName = args[0];
		}
		if (args.length > 1) {
			targetPath = args[1];
		}
		
		APKUnziper.unzipArchive(apkFileName, targetPath);
		
		//dex file
		String dexFile = targetPath + "/classes.dex";
		String jarFile = targetPath + "/classes.dex.jar";
		try {
			DexFileConvertor.convertFile(new File(dexFile), new File(jarFile));
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		//mainfest XML file
		String mainFestFile = targetPath + "/AndroidManifest.xml";
		String xmlFile = targetPath + "/AndroidManifest.decoded.xml";
		MainfestConvertor.convertFile(mainFestFile, xmlFile);
		//TODO:resource.arsc file
	}
}
